<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="惠信钱包，金融">
<meta name="description" content="描述描述描述" />
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<script type="text/javascript" src="/js/jquery.js"></script> 
<script type="text/javascript" src="/js/view/static/static.js"></script>
<script type="text/javascript" src="/js/view/user/login.js"></script>
<script type="text/javascript" src="/js/placeholder.js"></script>
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script> 
<script type="text/javascript" src="/js/rsa/RSA.js"></script> 
<script type="text/javascript" src="/js/rsa/BigInt.js"></script> 
<script type="text/javascript" src="/js/rsa/Barrett.js"></script> 
<script type="text/javascript" src="/js/rsa/RsaDataUtil.js"></script> 
<title>注册第二步</title>
<script type="text/javascript">
$(function(){
	  $(document).keydown(function(event){
	    if(event.keyCode==13){
	    	toRegisterSuccess();
	    }
});
});

function toRegisterSuccess(){
	if(testPassword()&&idNoCheck()&&nameCheck()&&testPayPassword()){
	    $('#regist_next_btn').attr("disabled",true); 
	    $("#rsaPwd").val(rsaData($("#pwd").val()));
	    $("#rsaPayPwd").val(rsaData($("#payPwd").val()));
		$('#regist').submit();
	}
}

//隐藏登录密码提示
function hidePwdLable(){
	var pwd=$("#pwd").val();
	if(pwd==""){
		$("#pwdMsg").hide();
		alert($("#pwd").type);
	}
}

//隐藏真实姓名提示
function hideRealNameLable(){
	var realName=$("#realName").val();
	if(realName==""){
		$("#realNameMsg").hide();
	}
}

//隐藏身份证提示
function hideIdcardLable(){
	var idcard=$("#idcard").val();
	if(idcard==""){
		$("#idcardMsg").hide();
	}
}

//隐藏支付密码提示
function hidePayPwdLable(){
	var payPwd=$("#payPwd").val();
	if(payPwd==""){
		$("#payPwdMsg").hide();
	}
}
</script>
</head>
<body>
<input id="module" type="hidden" value="<s:property value='#application.module'/>">
<input id="empoent" type="hidden" value="<s:property value='#application.empoent'/>">
<!--main-->
<!--header-->
<%@include file="/head.jsp"%>
<!--/header-->
<div class="main_bg">        	
	<div class="regist">
    	<h3 class="tit_step2"></h3>
    	<form action="${root}/userAction_regist.action" id="regist"  name="registerSuccess" method="post">
        <ul>
        	<li class="clearfix">
            	<label>登录密码：</label>
                <div class="position"><input type="password" id="pwd"  class="input" placeholder="请输入您的登录密码" onpaste="return false" onkeyup="testPassword();" /><span class="in_dea_text"></span>
                <input id="rsaPwd" name="rsaPwd" type="hidden"/>
                </div>
                <p class="suc_tips" id="pwdRight" style="display:none;"></p>
                <p class="err_tips" id="pwdMsg" style="display:none;"></p>
            </li>
            <li class="clearfix">
            	<label>真实姓名：</label>
                <div class="position"><input type="text" id="realName" name="userRegister.realName" value="<s:property value="userRegister.realName"/>" class="input" placeholder="请输入您的真实姓名" onblur="nameCheck();"  maxlength="20" /><span class="in_dea_text"></span></div>
                <p class="suc_tips" id="realNameRight" style="display:none;"></p>
                <p class="err_tips" id="realNameMsg" style="display:none;"></p>
            </li>
            <li class="clearfix">
            	<label>身份证：</label>
                <div class="position"><input type="text" id="idcard" name="userRegister.idcard" value="<s:property value="userRegister.idcard"/>" maxlength="18" class="input" placeholder="请输入您的身份证号码" onblur="idNoCheck();" /><span class="in_dea_text"></span></div>
                <p class="suc_tips" id="idcardRight" style="display:none;"></p>
                <p class="err_tips" id="idcardMsg" style="display:none;"></p>
            </li>
            <li class="clearfix">
            	<label>支付密码：</label>
                <div class="position"><input type="password" id="payPwd"  class="input" placeholder="请输入您的支付密码" onpaste="return false" onkeyup="testPayPassword();" /><span class="in_dea_text"></span>
                <input id="rsaPayPwd" name="rsaPayPwd" type="hidden"/>
                </div>
                <p class="suc_tips" id="payPwdRight" style="display:none;"></p>
                <p class="err_tips" id="payPwdMsg" style="display:none;"></p>
        </li>
            <li class="clearfix"><a id="regist_next_btn" href="javascript:void(0);" onclick="javascript:toRegisterSuccess();" class="mar_li btn l">下一步</a></li>
        </ul>
        <s:token />
         </form>
    </div>

            


</div>
<!--/main-->
<!--footer-->
<%@include file="/footer.jsp"%>
</body>

<script type="text/javascript">

<s:if test="dataMap.pwdErrorMsg != null && dataMap.pwdErrorMsg !='' ">
	$("#pwdMsg").show();
	$("#pwdMsg").text("<s:property value="dataMap.pwdErrorMsg"/>");
</s:if>

<s:if test="dataMap.realNameErrorMsg != null && dataMap.realNameErrorMsg !='' ">
	$("#realNameMsg").show();
	$("#realNameMsg").text("<s:property value="dataMap.realNameErrorMsg"/>");
</s:if>

<s:if test="dataMap.idcardErrorMsg != null && dataMap.idcardErrorMsg !='' ">
	$("#idcardMsg").show();
	$("#idcardMsg").text("<s:property value="dataMap.idcardErrorMsg"/>");
</s:if>

<s:if test="dataMap.payPwdErrorMsg != null && dataMap.payPwdErrorMsg !='' ">
	$("#payPwdMsg").show();
	$("#payPwdMsg").text("<s:property value="dataMap.payPwdErrorMsg"/>");
</s:if>

</script>

</html>
